package com.lhkj.ct.meta.modules.patient.model.vo;

import com.lhkj.ct.base.validator.group.ValGroups;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
  * <p>
  *     描述：单位表单详情
  * </p>
  */
@Setter
@Getter
public class PatUnitForm implements Serializable {

    @NotBlank(message = "单位id不能为空", groups = {ValGroups.Update.class})
    @ApiModelProperty(value = "单位id")
    private String id;

    @NotBlank(message = "父级id不能为空", groups = {ValGroups.Insert.class, ValGroups.Update.class})
    @ApiModelProperty(value = "父级id", notes = "顶级为0", example = "0")
    private String parentId;

    @NotBlank(message = "单位名称不能为空", groups = {ValGroups.Insert.class, ValGroups.Update.class})
    @Length(max = 100 ,message = "单位名称不能超过{max}字符", groups = {ValGroups.Insert.class, ValGroups.Update.class})
    @ApiModelProperty(value = "单位名称")
    private String unName;

    @NotBlank(message = "单位代码不能为空", groups = {ValGroups.Insert.class, ValGroups.Update.class})
    @Length(max = 10 ,message = "单位代码不能超过{max}字符", groups = {ValGroups.Insert.class, ValGroups.Update.class})
    @ApiModelProperty(value = "单位代码")
    private String unCode;

    @ApiModelProperty(value = "单位简称")
    private String unAlias;

    @ApiModelProperty(value = "单位地址")
    private String unAddress;

    @ApiModelProperty(value = "单位联系人")
    private String unContact;

    @ApiModelProperty(value = "联系电话")
    private String unPhone;

    @ApiModelProperty(value = "邮件地址")
    private String unEmail;

    @ApiModelProperty(value = "传真")
    private String unFax;

    @ApiModelProperty(value = "邮编")
    private String unZipCode;

    @ApiModelProperty(value = "单位简介")
    private String unIntro;

    @ApiModelProperty(value = "拼音简码")
    private String pyCode;

    @ApiModelProperty(value = "五笔简码")
    private String wbCode;

    @NotNull(message = "排序不能为NULL", groups = {ValGroups.Insert.class, ValGroups.Update.class})
    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "备注")
    private String remark;

}
